#ifndef TIMESTAMP_H
#define TIMESTAMP_H

#include <iostream>
#include <string>

#ifndef MAYBE_USE
#define MAYBE_USE  [[maybe_unused]] [[nodiscard]]
#define VOID_USE   [[maybe_unused]]
#define NO_RET     [[noreturn]]
#endif


// 时间类
class Timestamp
{
public:
    Timestamp() = default;
    explicit Timestamp(const int64_t microSecondsSinceEpoch): microSecondsSinceEpoch_(microSecondsSinceEpoch){}
    static Timestamp now() {
        return Timestamp(time(nullptr));
    }
    MAYBE_USE std::string toString() const;

private:
    int64_t microSecondsSinceEpoch_{0};
};

#endif // !TIMESTAMP_H